package com.open.exam.controller;

import com.open.exam.businessservice.ExamResultBusinessService;
import com.open.exam.databasemodel.ExamineeAnswerDetail;
import com.open.exam.databasemodel.ExamingMonitor;
import com.open.exam.databasemodel.ExamingMonitorLog;
import com.open.exam.utils.GsonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @Author 奶茶
 * Created by on 2019/3/18 13:35.
 */
@RestController
@RequestMapping(value = "/test")
public class TestController {

    @Autowired
    private ExamResultBusinessService resultBusinessService;

    @RequestMapping(value = "/test",method = RequestMethod.POST)
    public void test(@RequestBody String body){
        resultBusinessService.synchronizationExaminerAnswerDetails(GsonUtil.fromJsonToList(body, ExamineeAnswerDetail.class));
    }

}
